package cn.jtfadmin.base.dict.annotations;


import cn.jtfadmin.base.dict.annotations.handle.DictSerializer;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.lang.annotation.*;

/**
 * 字典注解, 标记一个类是一个字典,一般标记在枚举类上，
 *
 * @author akfh
 * @since 1.0
 */
@Target({ElementType.TYPE, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@JacksonAnnotationsInside
@JsonSerialize(using = DictSerializer.class)
public @interface Dict {

    /**
     * 枚举中文示意/动态字典的字典code
     *
     * @return 中文示意
     */
    String value();
}
